import {request,requestTest} from '../../utils/request';
import {CADILLAC_URL,isDebuger} from '../../utils/constants'
import {obj2params} from '../../utils/index';

// 列表查询
export function fetch(params) {
  if(isDebuger){
    return require("./../../../json/list").detail;
  } else {
    return request(CADILLAC_URL+'/menuController/getPageMenus?id=' +params)
  }
}
// 获取
export function fetchCountry(params) {
  if(isDebuger){
    return require("./../../../json/list").select;
  } else {
    return request(CADILLAC_URL+'/menuController/getPageMenus?id=' +params)
  }
}
// 保存
export function save(data) {
  if(isDebuger){
    return require("./../../../json/list").save;
  } else {
    let params = {tagInfo:data};
    return request(CADILLAC_URL+"/tag/save",'POST',{body:obj2params(params)});
  }
}
